package org.example.demo21.chain.impl;

import org.example.demo21.chain.interfaces.Filter;
import org.example.demo21.entity.bo.DemoBO;

/**
 *
 * @author guocong
 * @since 2024/3/29 11:47
 */
public class AgeFilter implements Filter {
    @Override
    public boolean doFilter(DemoBO demoBO) {
        boolean b = demoBO.getAge().compareTo(60) > 0;
        if (b) {
            System.out.println("\033[31m 年龄超了 \033[0m");
        }
        return !b;
    }


}
